Skip to content

Show the knocked out notice on the action bar instead of in chat - #166

Merged
XxFran10xX merged 1 commit into
mainfrom
knockout-notice-action-bar
Nov 22, 2026
Merged

XxFran10xX merged 1 commit into
mainfrom
knockout-notice-action-bar

Conversation

@XxFran10xX

@XxFran10xX XxFran10xX commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Status record

  • Reviewed: Fable 5.2 at b7659de: APPROVE (3 minor, cosmetic, not changed)
  • Second opinion: CodeRabbit at b7659de: APPROVED, no findings
  • Dev-tested: b7659de (CI build), bot test ~/ko-notice-test/test.js 6/6: notice on the action bar about once a second while down, never in chat, MMOCore HUD held off, gone after the 30 s knockout; no new Dev errors
  • Local tests at b7659de: PvP tests pass; full suite only fails the Windows-only file-lock/temp-dir tests (body, estate, database, progress stores), as usual on Windows

Why

A knocked out player who keeps clicking got "You're knocked out. You can still talk, but you can't do that." in chat once a second. On Main on 2026-11-22 a 30 second knockout filled a player's whole chat with it, and players posted the screenshot as a bug.

What changes

  • The downed-blocked notice now goes on the action bar instead of chat, still at most once a second. Chat stays free for roleplay.
  • It goes through MythicLib's action bar queue (HIGH priority, 2 s) when MythicLib tracks the player, because MMOCore redraws its own bar every tick; plain sendActionBar otherwise. This is the same path the armour fastening bar already used.
  • That action bar code moves out of ArmourDonning into a shared PvpActionBar; ArmourDonning behaves the same.
  • pvp.yml: comment only. The live messages.downed-blocked text keeps working, no config edit needed.

🤖 Generated with Claude Code

A knocked out player who keeps clicking got the downed-blocked line in chat
once a second, which filled chat for the whole knockout. It now goes on the
action bar through MythicLib's queue, like the armour fastening bar, so chat
stays free for roleplay. The shared action bar code moves to PvpActionBar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@XxFran10xX

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Updates
    • Armour-donning progress, completion and interruption messages now appear in the action bar.
    • Knocked-out players now see the blocked-action reminder in the action bar when they try to fight or use an item. The reminder is limited to once per second and resumes after they leave and rejoin.
    • Action-bar messages are cleared when appropriate, with a fallback for players not tracked by the action-bar system.

A shared helper now displays and clears PvP action-bar text. Armour-donning messages and knocked-out player reminders use this helper. Tests check the reminder’s action-bar delivery and rate limit.

Changes: PvP action-bar messaging

Layer / File(s) Summary
Shared action-bar handling
src/main/java/net/tfminecraft/rpcharacters/pvp/PvpActionBar.java
Adds show and clear methods. The helper queues text through MythicLib for tracked players and uses direct player messages otherwise.
Armour and knockout message integration
src/main/java/net/tfminecraft/rpcharacters/pvp/ArmourDonning.java, src/main/java/net/tfminecraft/rpcharacters/pvp/KnockoutRestrictions.java, src/main/resources/pvp.yml, src/test/java/net/tfminecraft/rpcharacters/pvp/KnockoutRestrictionsTest.java
Routes armour-donning messages and knockout reminders through the shared helper. Updates the configuration comment and tests for action-bar reminders.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: drefvelin

Merge Risk: Minimal · up to b7659

Knocked-out players will see the blocked-action notice on the action bar instead of in chat, and armour donning messages keep their current behaviour. No merge-blocking risk was found. Dev testing is still pending.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f6850ca6-f52d-4764-bd2c-6e33a659b7bc
Commits

Reviewing files that changed from the base of the PR and between 28ec0db and b7659de.

Files selected for processing: 5

  • src/main/java/net/tfminecraft/rpcharacters/pvp/ArmourDonning.java
  • src/main/java/net/tfminecraft/rpcharacters/pvp/KnockoutRestrictions.java
  • src/main/java/net/tfminecraft/rpcharacters/pvp/PvpActionBar.java
  • src/main/resources/pvp.yml
  • src/test/java/net/tfminecraft/rpcharacters/pvp/KnockoutRestrictionsTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions github-actions Bot added the size:M 30-99 effective changed lines (tests excluded in mixed PRs). label Nov 22, 2026
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@XxFran10xX
XxFran10xX merged commit a5d66d3 into main Nov 22, 2026
3 checks passed
@XxFran10xX
XxFran10xX deleted the knockout-notice-action-bar branch November 22, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant